package models.repository.common;

import models.entities.BrandEntity;
import models.entities.DuplicateEntity;
import models.entities.PictureEntity;
import models.entities.ProductEntity;

import java.io.IOException;
import java.util.List;

@Deprecated
public interface ImageRepository {

    PictureEntity getImageByMD5(String md5) throws IOException;

    List<PictureEntity> getImagesWithoutMD5() throws IOException;

    void updateMD5(PictureEntity pictureEntity) throws IOException;

    void changePath(PictureEntity pictureEntity) throws IOException;

    List<ProductEntity> getProductsByImageId(int id) throws IOException;

    List<BrandEntity> getBrandsByImage(int id) throws IOException;

    void setOriginalPictureForBrand(int imageId, int existentImageId, int brandId) throws IOException;

    void setOriginalPictureForProduct(int imageId, int existentImageId, int productId) throws IOException;

    void deletePicture(PictureEntity pictureEntity) throws IOException;

    int getImagesWithoutMD5TotalCount() throws IOException;

    void clearMD5() throws IOException;

    void addDuplicate(int originalImageId, int duplicateImageId) throws IOException;

    List<DuplicateEntity> getDuplicates() throws IOException;

    void readDuplicate(int id) throws IOException;

    PictureEntity getImage(int id) throws IOException;

    PictureEntity getProductImage(int imageId, Integer productId) throws IOException;

    void deleteProductImage(int imageId, Integer productId) throws IOException;
}
